package com.crowdfunding.feign;

import com.crowdfunding.config.FeignMultipartConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@FeignClient(value = "wanderingdream-upload",configuration = FeignMultipartConfig.class)
public interface UploadAdvice {
    @GetMapping(value = "/upload/uploadFile",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String getUrl(MultipartFile multipartFile);

    @GetMapping(value = "/upload/uploadFiles",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    List<String> getUrls(MultipartFile[] multipartFile);

}
